<template>
	<view style="background-color: #e0e0e0; width: 100vh;">
		<view style="background-color: #fff;padding: 20rpx;height:120rpx;">
			<text class="video_title">{{askInfo.title}}</text>
			<view style="margin-top: 15rpx;">
				<text style="float: left;">{{askInfo.createBy}}</text>
				<text style="float: right;">{{askInfo.consultDate}}</text>
			</view>
		</view>
		<view style="margin-top:15rpx;background-color: #fff;">
			<text>{{askinfo.expertName}}</text>
		</view>
		<view style="margin-top: 15rpx;background-color: #fff;padding: 20rpx;height: fit-content;">
			<textarea disabled v-model="askInfo.detail"></textarea>
		</view>
	</view>
</template>

<script>
	// 引入vuex
	import {
		mapState,
		mapMutations,
		mapGetters
	} from 'vuex';
	
	import * as ask from '../../../api/ask/ask.js'
	
	export default {
		data() {
			return {
				askInfo:{}
			}
		},
		onLoad(option) {
			uni.showLoading({})
			this.getUserDetail(option.id)
		},
		methods: {
			getUserDetail(id){
				ask.getAskDetail(id).then((res)=>{
					this.askInfo = res.data
				})
				uni.hideLoading()
			}
		}
	};	
</script>

<style>
	
	.video_title {
		display: -webkit-box;
		font-size: 33rpx;
		font-weight: 700;
		margin-top: 15rpx;
		white-space: nowrap;
		overflow: hidden;
		white-space: nowrap;
		text-overflow:ellipsis;
		-webkit-box-orient: vertical; /*排列方式*/ 
		-webkit-line-clamp: 1; /*显示文本行数(这里控制多少行隐藏)*/
	}
</style>